#FROM java:8
FROM java:8-jre
#FROM java:openjdk-8-jre-alpine

##### down zookeeper and unzip
#ARG url=http://mirrors.cnnic.cn/apache/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz
#RUN wget -O - $url | tar -zxvf - -C /opt
#RUN mv /opt/zookeeper-3.4.6 /opt/zookeeper

ADD ./zookeeper /opt/zookeeper

##### data folder
VOLUME /tmp/zookeeper


##### config file
ADD ./zoo.cfg /opt/zookeeper/conf/zoo.cfg



##### entry-point
ADD ./entry-point.sh /entry-point.sh
ENTRYPOINT ["/entry-point.sh"]